<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>接口规范</title>
    <link rel="stylesheet" href="${contextPath}/static/bootstrap-3.3.0/css/bootstrap.min.css">
    <link rel="stylesheet" href="${contextPath}/static/zTree_v3-master/css/metroStyle/metroStyle.css" type="text/css"/>
    <!--[if !IE]> -->
    <script src="${contextPath}/static/ace/assets/js/jquery-2.1.4.min.js"></script>
    <!-- <![endif]-->

    <!--[if IE]>
    <script src="${contextPath}/static/ace/assets/js/jquery-1.11.3.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="container">
    <div class="row">
        <h3 class="page-header">接口规范</h3>
        <div class="col-xs-12">
            <div>请求方式：post</div>
            <div>请求格式：contentType :'application/json', dataType:'json'</div>
            <div>请求token：放在请求的header当中,字段名为token</div>
            <div>返回格式：json</div>
            <div>请求示例：
                <pre>
$.ajax({
    type:'POST',
    data:{},
    contentType :'application/json',
    dataType:'json',
    url :'url',
    success :function(result) {
        if(result.success){
            alert("OK");
        }else{
            alert(result.msg);
        }
    },
    error :function(e) {
      alert("error");
   }})     
}</pre>
            </div>
            <div>返回值：</div>
            <div>
                <table class="table">
                    <thead>
                    <tr>
                        <th>字段名</th>
                        <th>字段</th>
                        <th>类型</th>
                        <th>说明</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td>状态</td>
                        <td>success</td>
                        <td>Boolean</td>
                        <td>true成功，false失败</td>
                    </tr>
                    <tr>
                        <td>返回说明</td>
                        <td>message</td>
                        <td>String</td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>数据</td>
                        <td>data</td>
                        <td>Object</td>
                        <td></td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div>返回示例：
                <pre>
{
   "status": 0,
   "message": "成功",
   "data": "xyz"
}</pre>
            </div>
        </div>
    </div>
</div>
</body>
<script src="${contextPath}/static/bootstrap-3.3.0/js/bootstrap.min.js"></script>
<script>
</script>
</html>
